Structures (Cont.)
Pascal
C/C++
struct
{
int id;
char name[11];
union
{
emploee EBorr;
student SBorr;
} Borr;
} borrower;
The variants can be accessed as
borrower.EBorr;
borrower.Borr.EBorr;
borrower.Sborr
borrower.Borr.SBorr